//
//  Greetable.swift
//  funcode
//
//  Created by Wan Jiading on 2016/12/2.
//  Copyright © 2016年 WanJiading. All rights reserved.
//

import UIKit

protocol Greetable {
	var name: String { get }
	func greet()
}



struct Person: Greetable {
	func greet() {
		print("你好 \(name), age = \(age)")
	}

	var name: String
	var age: Int
}



struct Cat: Greetable {
	func greet() {
		print("meow~ \(name)")
	}
	
	var name: String
}



struct Dog {
	
}
